<template>
	<view class="addr-book">
		 <!-- right-image="1" -->
		<uni-nav-bar dark  :fixed="true" :right-width="80" title="通讯录" background-color="#fff" color="#262E3F" @clickLeft="search()" @clickRight="addFriends()" />
		<view class="school-admin">
			<view class="logo-name">
				<image class="logo" src="/static/txl/logo.png" mode="aspectFill"></image>
				<text>同济大学第一附属中学</text>
			</view>
			<!-- <text class="admin">管理</text> -->
		</view>
		<view class="item" v-for="(item, i) in list" :key="i">
			<view class="info" @click="details(item.url)">
				<view class="logo-name">
					<image class="logo" :src="`/static/txl/${item.icon}.png`" mode="aspectFill"></image>
					<text class="name">{{item.name}}</text>
				</view>
				<uni-icons type="forward" color="#aaa"></uni-icons>
			</view>
		</view>
	</view>
</template>
<script>
import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
export default {
	components: {
		uniNavBar
			
    },
    data() {
		//, {name: '外部联系人', icon: 'wblxr', url: '/pages/addressBook/external-contact'},{name: '心灵驿站', icon: 'xlyz', url: '/pages/addressBook/soul-station'}
        return {
			list: [{name: '组织架构', icon: 'zzjg', url: '/pages/addressBook/org-structure'}, {name: '我的群组', icon: 'wdqz', url: '/pages/addressBook/my-groups'}, {name: '星标联系人', icon: 'xblx', url: '/pages/addressBook/star-contact'}],
        }
    },
	onShow(){
		uni.removeStorageSync('xdSelectAllInfo')
		
	},
	onLoad(){
		let user = uni.getStorageSync('tokenObj')
		if(user.userType==1){
			this.utils.setTTabBar()
		}else if(user.userType==2){
			this.utils.setSTabBar()
		}
	},
	methods: {
		search(){
			
		},
		addFriends(){
			uni.navigateTo({
				url: '/pages/addressBook/add-external-contacts'
			})
		},
		details(url){
			uni.navigateTo({
				url: url
			})
		}
	}
}
</script>
<style lang="less" scoped>
	.addr-book{
		
	}
	.item, .school-admin{
		overflow: hidden;
		
		
	}
	.admin{
		color: #169BD5;
		font-size: 26rpx;
	}
	.logo-name{
		.logo{
			width: 44rpx;
			height: 44rpx;
			margin-right: 16rpx;
		}
	}
	.info{
		height: 100rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 32rpx 0 16rpx;
		&:active{
			background-color: #f2f2f2;
			border-radius: 10rpx;
		}
	}
	.school-admin{
		height: 74rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx 40rpx 0 28rpx;
		text{
			font-size: 32rpx;
			vertical-align: super;
		}
	}
	.item {
		padding: 8rpx 20rpx 8rpx 16rpx;
		border-bottom: 1rpx solid #f2f2f2;
		.logo{
			width: 32rpx;
			height: 32rpx;
			margin-right: 26rpx;
		}
		.name{
			vertical-align: 6rpx;
			font-size: 28rpx;
		}
	}
</style>